﻿@model finalproject3.Models.DishProduct
@{
    ViewBag.Title = "Updatedish";
    Layout = "~/Views/Shared/_Layoutdish.cshtml";
}
<h2>Edit</h2>
<div>
<img src="~/images/@ViewBag.X.Imagepath"   alt="" width="40%" height="40%"/>
        </div>
@using (Html.BeginForm()) {
    
    @Html.ValidationSummary(true)
    

        @Html.HiddenFor(model => model.DPId)
        @Html.HiddenFor(model => model.Imagepath)
        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Region)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Region)
            @Html.ValidationMessageFor(model => model.Region)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Price)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Price)
            @Html.ValidationMessageFor(model => model.Price)
        </div>
         <div class="editor-label">
            @Html.LabelFor(model => model.Quantity)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Quantity)
            @Html.ValidationMessageFor(model => model.Quantity)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.category)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.category)
            @Html.ValidationMessageFor(model => model.category)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
}

<div>
    @Html.ActionLink("Back to List", "view_all_dishes")
</div>

                        